﻿<%@ Page Language="C#" MasterPageFile="~/User.master" AutoEventWireup="true" CodeFile="UViewCart.aspx.cs" Inherits="Pages_UViewCart" Title="Giỏ Hàng" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="PageStyle">
        <div class="Content">
            <div class="HeaderStyle">
                <span class="HeadItem">Giỏ Hàng</span>
            </div>
            <div class="FormStyle">
                <div class="MsgError">
                    <asp:CustomValidator ID="cval" runat="server" ValidationGroup="viewCart" Display="Dynamic"></asp:CustomValidator></div>
                <table cellpadding="0" cellspacing="0">
                    <tr>
                        <td>
                            Ngày tạo
                        </td>
                        <td class="c1empty">
                        </td>
                        <td>
                            <asp:Label ID="Label1" runat="server" CssClass="TextView"></asp:Label>
                        </td>
                    </tr>
                    <tr class="r1empty">
                        <td colspan="3">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Khách hàng
                        </td>
                        <td class="c1empty">
                        </td>
                        <td>
                            <asp:Label ID="Label2" runat="server" CssClass="TextView"></asp:Label>
                        </td>
                    </tr>
                    <tr class="r1empty">
                        <td colspan="3">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <span style="font-weight:bold; font-size:13px">Chi tiết giỏ hàng</span>
                        </td>
                        <td class="c1empty">
                        </td>
                        <td>
                        </td>
                    </tr>
                </table>
                <div class="r1empty">
                </div>
                <asp:GridView ID="gv" GridLines="None" runat="server" AutoGenerateColumns="False"
                    DataKeyNames="DeID" CellPadding="0" AllowPaging="True" CssClass="GridStyle" AllowSorting="True"
                    EnableModelValidation="True" OnRowUpdating="clickUpdateItem"
                    OnPageIndexChanging="gv_PageIndexChanging" PageSize="5">
                    <Columns>
                        <asp:TemplateField HeaderText="Mã sản phẩm">
                            <ItemTemplate>
                                <%# Eval("ProID")%>
                            </ItemTemplate>
                            <ItemStyle CssClass="RowCell" />
                            <HeaderStyle CssClass="HeaderCell" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="T&#234;n">
                            <ItemTemplate>
                                <%# Eval("TEN")%>
                            </ItemTemplate>
                            <ItemStyle CssClass="RowCell" />
                            <HeaderStyle CssClass="HeaderCell" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="SL">
                            <ItemTemplate>
                                <asp:TextBox ID="txtSL" style="text-align:center" Width="30px" MaxLength="2" runat="server" Text='<%# Eval("SoLuong") %>'></asp:TextBox>
                            </ItemTemplate>
                            <ItemStyle Width="40px" HorizontalAlign="center" CssClass="RowCell" />
                            <HeaderStyle CssClass="HeaderCell" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Gi&#225;">
                            <ItemTemplate>
                                <%# (int.Parse(Eval("GIA").ToString())).ToString("$#,#", myInfo)%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Right" CssClass="RowCell" />
                            <HeaderStyle CssClass="HeaderCell" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Th&#224;nh tiền">
                            <ItemTemplate>
                                <%#  (int.Parse(Eval("ThanhTien").ToString())).ToString("$#,#", myInfo)%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Right" CssClass="RowCell" />
                            <HeaderStyle CssClass="HeaderCell" />
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:LinkButton ID="btUpdate" runat="server" CommandName="Update" CommandArgument='<%# Eval("DeID")%>'
                                    Text="Cập nhật"></asp:LinkButton>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" CssClass="RowCell" />
                            <HeaderStyle CssClass="HeaderCell" Width="100px" />
                        </asp:TemplateField>
                    </Columns>
                    <RowStyle CssClass="GridRow" />
                    <AlternatingRowStyle CssClass="GridAltRow" />
                    <HeaderStyle CssClass="GridHeader" />
                    <FooterStyle CssClass="GridFooter" />
                    <PagerStyle CssClass="GridPager" />
                    <PagerSettings PageButtonCount="5" />
                </asp:GridView>
                <div class="r1empty">
                </div>
                <div style="text-align: right; font-weight: bold;">
                    <asp:Label ID="Label20" Text="Tổng tiền : " runat="server">
                        <asp:Label ID="Label21" runat="server"></asp:Label></asp:Label></div>
                <div class="r1empty">
                </div>
                <div class="ButtonStyle">
                    <asp:Button ID="btSave" runat="server" Text="Lưu Lại" CausesValidation="true" ValidationGroup="viewCart"
                        OnClick="clickUpdate" />
                        <asp:Button ID="btPayment" runat="server" Text="Thanh Toán" CausesValidation="true" ValidationGroup="viewCart"
                        OnClick="clickPayment" />
                </div>
            </div>
            <div class="FooterStyle">
            </div>
        </div>
    </div>
</asp:Content>


